package org.springblade.modules.admin.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.modules.admin.enums.CompanyCategoryEnum;

import java.util.Date;

/**
 * @Date 10:07 2022/5/30
 * @Description {
 *   平台消息VO
 * }
 * @Author lsay
 **/
@Data
public class MaintainMsgVO {

	/**
	 * id
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

    /**
     * 标题
     */
    private String title;

    /**
     * 内容
     */
    private String content;

    /**
     * 消息类型 1-项目关联申请
     */
    private Integer type;

	/**
	 * 业务子分类: {
	 *     救援预警消息：1-即将超时到达 2-超时未到达
	 * }
	 */
	private Integer bType;

    /**
     * 关联业务表id
     */
	@JsonSerialize(using = ToStringSerializer.class)
    private Long otherId;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	/**
	 * 租户id
	 */
	private String tenantId;

	/**
	 * 租户名称
	 */
	private String tenantName;

	/**
	 * 租户分类
	 */
	private Integer companyCategory;

	/**
	 * 租户分类
	 */
	private String companyCategoryName;

	/**
	 * 业务状态 1-未读 2-已读
	 */
	private Integer status;

	private Integer planStatus;

	public void setCompanyCategory(Integer companyCategory) {
		this.companyCategory = companyCategory;
		this.companyCategoryName = CompanyCategoryEnum.getName(companyCategory);
	}
}
